﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RecommenderSystem.misc
{
    class Comparator : IComparer<KeyValuePair<string, double>>
    {

        public int Compare(KeyValuePair<string, double> x, KeyValuePair<string, double> y)
        {
            if (x.Value > y.Value)
                return -1;
            if (x.Value == y.Value)
                return 0;
            return 1;
        }
    }
}
